-- GENERATED SPELL FOR [Baelmon the Hound-Master] --


function spell0_19747(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19747', 18000, 1)
end

function spell1_19747(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(20754,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19747', 9000, 1)
end

function spell2_19747(pUnit, Event) --@Summon Wrath Hound,n/a--
pUnit:FullCastSpellOnTarget(39272,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19747', 1000, 1)
end

function Sorts_19747(pUnit, Event)
local choix_sorts_19747 = math.random(0, 2)
if choix_sorts_19747 == 0 then
pUnit:RegisterEvent('spell0_19747', 1, 1)
end
if choix_sorts_19747 == 1 then
pUnit:RegisterEvent('spell1_19747', 1, 1)
end
if choix_sorts_19747 == 2 then
pUnit:RegisterEvent('spell2_19747', 1, 1)
end
end

function mob19747_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19747', math.random(1500, 3000), 1)
end

function mob19747_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19747_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19747_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19747, 1, 'mob19747_Action')
RegisterUnitEvent(19747, 2, 'mob19747_Leave')
RegisterUnitEvent(19747, 3, 'mob19747_Kill')
RegisterUnitEvent(19747, 4, 'mob19747_Die')
